import os
import time

def gnome_screenshot(image_path):
    start_time = time.time()
    cmd = '(gnome-screenshot' + ' -f ' + '"'+image_path+'"'+' > /dev/null 2>&1) &'
    os.system(cmd)
    run_time = time.time() - start_time
    return round(run_time, 3)


def scrot_screenshot(image_path):
    start_time = time.time()
    cmd = 'scrot' + ' -o ' + "'"+image_path+"'"
    os.system(cmd)
    run_time = time.time() - start_time
    return round(run_time, 3)
